//
//  AppDelegate.m
//  TestAll
//
//  Created by zhaoguoying on 2017/9/27.
//  Copyright © 2017年 ZDHS. All rights reserved.
//

#import "AppDelegate.h"
#import "ViewController.h"
#import "JPFPSStatus.h"
//#import <AvoidCrash.h>
#import "ChatListVC.h"
#import <HYBNetworking.h>
#import "FriendVC.h"
#import "LoginVC.h"
#import "BasicNavViewController.h"
#import "RC.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    [self.window makeKeyWindow];
    ViewController *myVC = [[LoginVC alloc] init];
    UINavigationController *naVC = [[UINavigationController alloc] initWithRootViewController:myVC];
    self.window.rootViewController = naVC;
    
#ifdef DEBUG
    [[JPFPSStatus sharedInstance] open];
#else
//    [AvoidCrash makeAllEffective];
//    [AvoidCrash setupNoneSelClassStringsArr:@[@"NSString",@"NSArray",@"NSDictionary"]];
#endif
    [RC.sharedRC _init];
    return YES;
}


-(void)mainRootVC{
    
    UITabBarController *tab = [UITabBarController new];
    
    ChatListVC *conversationListVC = [[ChatListVC alloc] initWithDisplayConversationTypes:@[@(ConversationType_PRIVATE),@(ConversationType_GROUP),@(ConversationType_SYSTEM)] collectionConversationType:@[@(ConversationType_SYSTEM)]];
    UINavigationController *naVC = [[BasicNavViewController alloc] initWithRootViewController:conversationListVC];
    naVC.title = @"会话";
    
    FriendVC *friendVC = FriendVC.new;
    friendVC.title = @"好友";
    UINavigationController *naVC2 = [[BasicNavViewController alloc] initWithRootViewController:friendVC];
    tab.viewControllers = @[naVC,naVC2];
    self.window.rootViewController = tab;
}

@end
